package com.example.graduatetest.activitys;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.ViewModelProviders;

import android.os.Bundle;

import com.baidu.mapapi.CoordType;
import com.baidu.mapapi.SDKInitializer;
import com.example.graduatetest.R;
import com.example.graduatetest.databinding.ActivitySendCardBinding;
import com.example.graduatetest.view.model.SendCardViewModel;

public class SendCardActivity extends AppCompatActivity {
    private ActivitySendCardBinding binding;
    private SendCardViewModel sendCardViewModel;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


        setContentView(R.layout.activity_send_card);

        //隐藏ActionBar
        if(getSupportActionBar() != null){
            ActionBar actionBar = getSupportActionBar();
            actionBar.hide();
        }
        binding = DataBindingUtil.setContentView(this,R.layout.activity_send_card);

        //接受Intent传来的数据
//        Intent intent = getIntent();
//        Classes ownClass = (Classes) intent.getSerializableExtra("classes");

        //LiveData
        sendCardViewModel = ViewModelProviders.of(this).get(SendCardViewModel.class);
        binding.setSendCardViewModel(sendCardViewModel);
        binding.setLifecycleOwner(this);
        sendCardViewModel.init(this,binding);
    }
}
